<!DOCTYPE html>
<html> 	
	<head lang="en"> 	
		<meta charset="UTF-8">	
		<title>时间</title>	
		<script type="text/javascript"> 	
			function disptime(){	
				var today=new Date();	
				var yyyy=today.getFullYear(); 	
				var MM=today.getMonth(); 	
				var dd=today.getDate();	
				var hh=today.getHours();			
				var t=""; 	
			if(hh>12&&hh<=18){
					t="下午好！";
			}
			if(hh>18||hh<7){	
					t="晚上好！";
			}else{
				t="上午好！"
			}
				var day=today.getDay(); 
				var mm=today.getMinutes();
				var ss=today.getSeconds(); 								
				document.getElementById("p").innerHTML="今天日期："+yyyy+"年"+(MM+1)+"月"+dd+"日"+"<br/>现在时间："+hh+"时"+mm+"分"+ss+"秒<br/>"+t+"欢迎来贵美！";	
			}	
			var myTime=setInterval("disptime()",1000);
		</script> 	
	</head>	
	<body>
		<div id="p">
			
		</div>
	</body>
</html>